import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/src/common/config.dart';
import 'package:finance_app/src/widgets/bottom_sheet/delete_info_bottom_sheet.dart';

mixin CheckPlanMixin<T> on BaseProvider<T> {
  bool isPlanExpired() {
    if (Config.currentSubscription.flag == 1) {
      obtainContext?.call((context) async {
        if (Config.currentSubscription.isTrial == 1) {
          showTrialHasExpiredBottomSheet(context);
        } else {
          showSubscriptionExpiredBottomSheet(context);
        }
      });
      return true;
    } else {
      return false;
    }
  }
}
